#!/usr/bin/env bash

mvn package -DskipTests


cd target
cp *.jar docker

cd /data/aiyuwen/eureka/target/docker

docker build . -t aiyuwen-eureka-server
_work=`pwd`
echo "in param:"$1

docker rm -f aiyuwen-eureka-server
docker run --name='aiyuwen-eureka-server' --add-host node3:172.31.236.43 --add-host node4:172.31.236.44 -p 18761:18761 -e 'spring.profiles.active='$1 -d aiyuwen-eureka-server